function star3D(name, radius){
	
	var that = this;
	
	this.name = name || 'sun';
	this.radius = Math.log(1 + radius) || 1;
	this.rotation_speed = 0.01
	
	this.texture_url = '/static/img/texture/' + this.name + '_map.jpg';
	this.geometry = new THREE.SphereGeometry(this.radius, 20, 20);
	this.texture = THREE.ImageUtils.loadTexture(this.texture_url);
	this.material = new THREE.MeshBasicMaterial({map: this.texture, overdraw: true});
	this.mesh = new THREE.Mesh(this.geometry, this.material);
	this.mesh.rotation.x = Math.PI/2
	
	this.animate = function(){
		that.mesh.rotation.z += that.rotation_speed;
	}
};

function displayStar(view_context){
	
	var star_3D = new star3D();
	
	view_context.reset();
	view_context.animateFunctions.push(star_3D.animate);
	view_context.scene.add(star_3D.mesh);

}
